/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package comandaXM.classes.manteniment.auxiliar;

/**
 *
 * @author xmarti
 */
public class TipusPagament {
    private int id;
    private String codi;
    private String nom;
    private int dies;
    private int diaPagament=25; 
    private boolean actiu; 

    public TipusPagament() {
        this.actiu=true; 
    }
    
    public TipusPagament(int id, String codi, String nom, int dies, boolean actiu) {
        this.id = id;
        this.codi = codi;
        this.nom = nom;
        this.dies = dies;
        this.actiu = actiu;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getCodi() {
        return codi;
    }

    public void setCodi(String codi) {
        this.codi = codi;
    }

    public String getNom() {
        return nom;
    }

    public void setNom(String nom) {
        this.nom = nom;
    }

    public int getDies() {
        return dies;
    }

    public void setDies(int dies) {
        this.dies = dies;
    }

    public int getDiaPagament() {
        return diaPagament;
    }

    public void setDiaPagament(int diaPagament) {
        this.diaPagament = diaPagament;
    }

    public boolean isActiu() {
        return actiu;
    }

    public void setActiu(boolean actiu) {
        this.actiu = actiu;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 47 * hash + this.id;
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final TipusPagament other = (TipusPagament) obj;
        if (this.id != other.id) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return nom;
    }
    
    
       
}
